/* V3认证服务 - 简化通用样式 */

:root {
    /* 简化色彩系统 */
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    
    --border-color: #dee2e6;
    --border-light: #e9ecef;
    
    /* 简化阴影 */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    background: var(--bg-secondary);
    line-height: 1.6;
    color: var(--text-primary);
}

/* 容器 */
.container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

/* 标题 */
.title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-align: center;
}

/* 表单 */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* 提醒框 */
.alert {
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border: 1px solid transparent;
    text-align: center;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* OAuth2特殊样式 */
.oauth2-notice {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: var(--radius-md);
    margin: 15px 0;
    border-left: 4px solid var(--primary-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.user-section {
    text-align: center;
    padding: 20px 0;
}

.oauth2-section {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-md);
    margin: 20px 0;
}

.oauth2-section p {
    margin: 8px 0;
    font-size: 0.9rem;
    word-break: break-all;
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.actions .btn {
    width: auto;
    flex: 1;
}

/* 登录页面特殊样式 */
.login-section {
    text-align: center;
    padding: 40px 20px;
}

.login-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        margin: 20px auto;
        padding: 15px;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .actions .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; } 